{extend name="public/layout" /}
{block name="title"}
    <?php if(isset($category) && !empty($category)) { echo($category->name); } else { echo('话题列表'); } ?>
{/block}
{block name="content"}
<div class="row mb-5">
    <div class="col-lg-9 col-md-9 topic-list">
        {if(isset($category) && !empty($category))}
            <div class="alert alert-info" role="alert">
                {$category->name} ：{$category->description}
            </div>
        {/if}
        <div class="card ">

            <div class="card-header bg-transparent">
                <ul class="nav nav-pills">
                    <li class="nav-item"><a class="nav-link <?php echo(order_active('order', 'recent', false)); ?>" href="<?php echo(request()->baseUrl()); ?>">最后回复</a></li>
                    <li class="nav-item"><a class="nav-link <?php echo(order_active('order', 'recent')); ?>" href="<?php echo(request()->baseUrl()); ?>?order=recent">最新发布</a></li>
                </ul>
            </div>

            <div class="card-body">
                <!-- 话题列表 -->
                {include file="topic/_list", 'paginate'='$paginate' /}
            </div>
        </div>
    </div>

    <div class="col-lg-3 col-md-3 sidebar">
        {include file="topic/_sidebar" /}
    </div>
</div>
{/block}